package com.yanqu.road.logic.bussiness.servercenter;

import com.yanqu.road.entity.beautyescort.EscortServerGroup;
import com.yanqu.road.entity.mall.HideMallData;
import com.yanqu.road.entity.servercenter.*;
import com.yanqu.road.entity.servercenter.group.CricketServerGroup;
import com.yanqu.road.entity.servercenter.group.CrossMarriageGroup;
import com.yanqu.road.entity.servercenter.tabnotice.ChannelTabNotice;
import com.yanqu.road.entity.union.cross.CrossUnionServerGroup;
import com.yanqu.road.entity.union.huaben.UnionHuaBenServerGroup;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;

public class ServerBussiness {

	public static DataUploadInfo getDataUploadInfo(int channelId) throws Exception {
		return DaoHelper.getServerInfoDaoImpl().getDataUploadInfo(channelId);
	}

	public static int getCloseServerCountdownMinutes() {
		return DaoHelper.getServerInfoDaoImpl().getCloseServerCountdownMinutes();
	}

	public static List<ServerInfo> getServerInfoList() {
		return DaoHelper.getServerInfoDaoImpl().getServerInfoList();
	}

	public static void updateServer(ServerInfo serverInfo) {
		DaoHelper.getServerInfoDaoImpl().updateServer(serverInfo);
	}

	public static Map<Integer, List<Integer>>  getActivityServerShowMap() {
		return DaoHelper.getServerInfoDaoImpl().getActivityServerShowMap();
	}

	public static HashMap<Long, HashSet<String>> getCnActivityUserList() {
		return DaoHelper.getServerInfoDaoImpl().getCnActivityUserList();
	}

	public static Map<String, Long> getForbiddenIpMap() {
		return DaoHelper.getServerInfoDaoImpl().getForbiddenIpMap();
	}

	public static boolean addForbiddenIp(String ip, long forbiddenEndTime) {
		return DaoHelper.getServerInfoDaoImpl().addForbiddenIp(ip, forbiddenEndTime);
	}

	public static boolean updateForbiddenIp(String ip, long forbiddenEndTime) {
		return DaoHelper.getServerInfoDaoImpl().updateForbiddenIp(ip, forbiddenEndTime);
	}

	public static ServerInfo getServerInfoByServerId(long serverId) {
		return DaoHelper.getServerInfoDaoImpl().getServerInfoByServerId(serverId);
	}

	public static List<ServerInfo> getServerInfoListByServerIdList(List<Long> serverIdList) {
		return DaoHelper.getServerInfoDaoImpl().getServerInfoListByServerIdList(serverIdList);
	}

	public static Map<Long, Map<String, ServerNameLanguage>> getServerNameLanguageMap() {
		return DaoHelper.getServerInfoDaoImpl().getServerNameLanguageMap();
	}

	public static Map<Integer, Long> getHideTimeMap() {
		return DaoHelper.getServerInfoDaoImpl().getHideTimeMap();
	}

	public static Map<Integer,Map<String, ChannelNotice>> getChannelNoticeMap() {
		return DaoHelper.getServerInfoDaoImpl().getChannelNoticeMap();
	}

	public static Map<Integer, List<ChannelTabNotice>> getChannelTabNoticeMap() {
		return DaoHelper.getServerInfoDaoImpl().getChannelTabNoticeMap();
	}

	public static void getServerGroupMap(Map<Integer, Map<Integer,ServerGroup>> channelServerGroupMap, Map<Integer,ServerGroup> serverGroupMap) {
		DaoHelper.getServerGroupDaoImpl().getServerGroupMap(channelServerGroupMap, serverGroupMap);
	}

	public static Map<Integer, Map<Integer, ServerGroup2>> getAllServerGroup2Map() {
		return DaoHelper.getServerGroup2DaoImpl().getAllServerGroup2Map();
	}

	public static Map<Integer, ServerGroup2> getServerGroup2Map(int groupType) {
		return DaoHelper.getServerGroup2DaoImpl().getServerGroup2Map(groupType);
	}

	public static Map<Integer, ChannelInfo> getChannelListInfo() throws Exception {
		return DaoHelper.getServerInfoDaoImpl().getChannelListInfo();
	}

	public static void getCrossServerGroupMap(Map<Integer, Map<Integer,CrossServerGroup>> channelServerGroupMap, Map<Integer,CrossServerGroup> serverGroupMap) {
		DaoHelper.getCrossServerGroupDaoImpl().getServerGroupMap(channelServerGroupMap, serverGroupMap);
	}

	public static Map<String, List<LightMsg>> getLightMsg(int channelId, long serverId) throws Exception{
		return DaoHelper.getServerInfoDaoImpl().getLightMsg(channelId, serverId);
	}
	public static List<Integer> getHideGoodsId(int channelId) throws Exception {
		return DaoHelper.getServerInfoDaoImpl().getHideGoodsId(channelId);
	}

	public static List<HideMallData> getHideMallList(int channelId) throws Exception {
		return DaoHelper.getServerInfoDaoImpl().getHideMallList(channelId);
	}

	/**
	 * 获取appid渠道信息
	 * @return
	 */
    public static Map<String, AppIdChaneelInfo> getAppIdChannelInfoMap() throws Exception {
    	return DaoHelper.getServerInfoDaoImpl().getAppIdChannelInfoMap();
    }

	public static void getMatchServerGroupMap(Map<Integer, Map<Integer, MatchServerGroup>> tempChannelServerGroupMap, Map<Integer, MatchServerGroup> tempServerGroupMap) {
		DaoHelper.getMatchServerGroupDapImpl().getMatchServerGroupMap(tempChannelServerGroupMap, tempServerGroupMap);
	}

    public static Map<String, Map<String, ChannelNotice>> getAppIdChannelNoticeMap() {
		return DaoHelper.getServerInfoDaoImpl().getAppIdChannelNoticeMap();
    }

    public static Map<String, Short> getHideJinYuUserMap() {
		return DaoHelper.getServerInfoDaoImpl().getHideJinYuUserMap();
    }

	public static Map<String, Map<String, String>> getFixedLanguageMap() {
		return DaoHelper.getServerInfoDaoImpl().getFixedLanguageMap();
	}

	public static void getCrossMarriageGroupMap(Map<Integer, Map<Integer, CrossMarriageGroup>> channelMarriageGroupMap,
										 Map<Integer,CrossMarriageGroup> marriageGroupMap) {
    	DaoHelper.getCrossMarriageGroupDaoImpl().getCrossMarriageGroupMap(channelMarriageGroupMap, marriageGroupMap);
	}

	public static void getEscortCrossServerGroupMap(Map<Integer, Map<Integer, EscortServerGroup>> tempChannelServerGroupMap, Map<Integer, EscortServerGroup> tempServerGroupMap) {
    	DaoHelper.getEscortServerGroupDaoImpl().getServerGroupMap(tempChannelServerGroupMap, tempServerGroupMap);
	}

	public static void getDAServerInfoList(Map<Integer, List<DAServerInfo>>  channelServerMapTemp) {
		DaoHelper.getDAServerInfoDaoImpl().getDAServerInfoList(channelServerMapTemp);
	}

	public static Map<Long, String> getServerNameMap(int channelId) {
		return DaoHelper.getServerInfoDaoImpl().getServerNameMap(channelId);
	}

	public static void getCrossUnionServerGroupMap(Map<Integer, Map<Integer, CrossUnionServerGroup>> tempChannelServerGroupMap, Map<Integer, CrossUnionServerGroup> tempServerGroupMap) {
		DaoHelper.getCrossUnionServerGroupDaoImpl().getServerGroupMap(tempChannelServerGroupMap, tempServerGroupMap);
	}

	public static void getUnionHuaBenServerGroupMap(Map<Integer, Map<Integer, UnionHuaBenServerGroup>> tempChannelServerGroupMap, Map<Integer, UnionHuaBenServerGroup> tempServerGroupMap) {
		DaoHelper.getUnionHuaBenServerGroupDaoImpl().getServerGroupMap(tempChannelServerGroupMap, tempServerGroupMap);
	}

	public static Map<Integer, GameEditLimit> getGameEditLimitMap(int channelId){
		return DaoHelper.getGameEditLimitDaoImpl().getGameEditLimitMap(channelId);
	}

	public static Map<Integer, MallRebate> getMallRebateMap(int channelId) {
		return DaoHelper.getMallRebateDaoImpl().getMallRebateMap(channelId);
	}

	public static void getCricketServerGroupMap(Map<Integer, Map<Integer, CricketServerGroup>> tempChannelServerGroupMap, Map<Integer, CricketServerGroup> tempServerGroupMap) {
		DaoHelper.getCricketServerGroupDapImpl().getCricketServerGroupMap(tempChannelServerGroupMap, tempServerGroupMap);
	}

	public static List<Integer> getHideGoodsIdReview(int channelId) throws Exception {
		return DaoHelper.getServerInfoDaoImpl().getHideGoodsIdReview(channelId);
	}
}
